<?php


namespace app\api\controller\v1;

use app\adminapi\controller\AuthController;
use app\services\office\OfficeStudentService;
use think\facade\App;

/**
 * 测试
 */
class TestCatalog extends AuthController
{
    public function __construct(App $app,OfficeStudentService  $service)
    {
        parent::__construct($app);
        $this ->services = $service;
    }
    /*
     * 测试目录
     */
    public function index(){
        $where = $this->request->postMore([
            ['website_id',$this->website],
            ['idcard',''],
            ['pattern','']
        ]);
        return app()->make('json')->successful($this->services->getTest($where));
    }

    /*
     * 测试成绩
     */

    public function exam(){
        $where = $this->request->postMore([
            ['website_id',$this->website],
            ['idcard',''],
            ['pattern','']
        ]);
        return app()->make('json')->successful($this->services->getExamRecord($where));
    }
}